package sskj.regulatory.domain.repository

import com.hikvision.sdk.net.bean.LoginData
import sskj.regulatory.data.response.session.TokenResponse
import io.reactivex.Flowable
import sskj.regulatory.data.response.session.IndexDataResponse
import sskj.regulatory.data.response.Response
import sskj.regulatory.data.response.eng.EngResponse
import sskj.regulatory.domain.entity.user.BingDingEntity
import sskj.regulatory.domain.entity.user.UserEntity
import sskj.regulatory.domain.fetcher.result_listener.RequestType


interface UserRepository {

    fun delBingDing(id: String): Flowable<Response>

    //绑定用户
    fun bingDing(bidngDingEntity: BingDingEntity): Flowable<Response>

    //项目部认证
    fun xmbAuth(username: String, password: String): Flowable<EngResponse>

    //项目部扫码登录
    fun xmbQrLogin(qrCode: String, username: String, password: String): Flowable<Response>

    //项目部扫码登录确认
    fun xmbDoQrLogin(qrCode: String, loginIn: Boolean): Flowable<Response>

    //更新token
    fun refreshToken(): Flowable<TokenResponse>

    //设置登录状态
    fun logIn()

    //判断是否登录
    fun isUserLoggedIn(): Boolean

    //获取用户初始化信息
    fun getIndexData(): Flowable<IndexDataResponse>

    //获取用户信息
    fun getUser(): Flowable<UserEntity>

    //清空缓存
    fun clearCache()

    //清空登录数据
    fun clearLoginData()

    //获取TOKEN
    fun getToken(username: String, password: String): Flowable<TokenResponse>

    //保存TOKEN
    fun saveToken(token: String?)

    //发送验证码
    fun sendVCode(phone: String, vCode: String, signName: String, templateCode: String, templateParam: String, outId: String): Flowable<Response>

    //注册用户
    fun registerUser(userEntity: UserEntity): Flowable<Response>

    //判断用户名是否注册
    fun isRegister(username: String): Flowable<Response>

    //清除缓存数据
    fun clearData(requestType: RequestType)

    //修改密码
    fun updatePassword(userEntity: UserEntity): Flowable<Response>

    //保存倒计时时间
    fun saveAlong()

    //是否可以发送
    fun isSendVCode(): Boolean
}